package com.ticket.system.service.impl;

import java.util.List;
import com.ticket.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ticket.system.mapper.TUserShareMapper;
import com.ticket.system.domain.TUserShare;
import com.ticket.system.service.ITUserShareService;

/**
 * 用户分享Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-04-19
 */
@Service
public class TUserShareServiceImpl implements ITUserShareService 
{
    @Autowired
    private TUserShareMapper tUserShareMapper;

    /**
     * 查询用户分享
     * 
     * @param id 用户分享主键
     * @return 用户分享
     */
    @Override
    public TUserShare selectTUserShareById(Long id)
    {
        return tUserShareMapper.selectTUserShareById(id);
    }

    /**
     * 查询用户分享列表
     * 
     * @param tUserShare 用户分享
     * @return 用户分享
     */
    @Override
    public List<TUserShare> selectTUserShareList(TUserShare tUserShare)
    {
        return tUserShareMapper.selectTUserShareList(tUserShare);
    }

    /**
     * 新增用户分享
     * 
     * @param tUserShare 用户分享
     * @return 结果
     */
    @Override
    public int insertTUserShare(TUserShare tUserShare)
    {
        tUserShare.setCreateTime(DateUtils.getNowDate());
        return tUserShareMapper.insertTUserShare(tUserShare);
    }

    /**
     * 修改用户分享
     * 
     * @param tUserShare 用户分享
     * @return 结果
     */
    @Override
    public int updateTUserShare(TUserShare tUserShare)
    {
        tUserShare.setUpdateTime(DateUtils.getNowDate());
        return tUserShareMapper.updateTUserShare(tUserShare);
    }

    /**
     * 批量删除用户分享
     * 
     * @param ids 需要删除的用户分享主键
     * @return 结果
     */
    @Override
    public int deleteTUserShareByIds(Long[] ids)
    {
        return tUserShareMapper.deleteTUserShareByIds(ids);
    }

    /**
     * 删除用户分享信息
     * 
     * @param id 用户分享主键
     * @return 结果
     */
    @Override
    public int deleteTUserShareById(Long id)
    {
        return tUserShareMapper.deleteTUserShareById(id);
    }
}
